package com.source.multithread.run;

import lombok.SneakyThrows;

/**
 * @Author wengqy
 * @Date 2020/12/19
 */
public class RunableDemo  implements Runnable{

    @Override
    public void run() {
        for (int i = 0; i <200 ; i++) {
            try {
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("多线程被执行了"+i);
        }
    }

    public static void main(String[] args) throws InterruptedException {
        new Thread(new RunableDemo()).start();

        for (int i = 0; i <200 ; i++) {
            Thread.sleep(10);
            System.out.println("每天都在学习java"+i);
        }
    }
}
